import java.util.Scanner;
public class Ex4 {
	
	public static void main(String[] args){
		
		Scanner sc = new Scanner(System.in); 
		
		int a = 0;							
		int b = 0;
		int c = 0;
		int userInput = sc.nextInt();			
		sc.close();

		while ( c < userInput){					//The loop proceeds as long as 'c' < user input.
			
			if (b < c){							//if b<c then we proceed to the next loop , and if not we raise 'c' by 1 and zero 'b'
				
				if (a < b){						//if a<b we proceed , if not we raise 'b' by 1 and zero a.
					
					if (a*a + b*b == c*c){		//if we find a Pythagorean three , we print it out as requested. 
						
						System.out.println("("+ a + "," + b + "," + c +")" + " : " + a + "*" + a + " + " + b + '*' + b + " = "
								+ c + '*' + c);  // ‫‪(a,b,c) : a*a + b*b = c*c
					}
				a = a + 1;
				
				}else{
					a = 0;
					b = b + 1;
				}
			}else{
				b = 0;
				c = c + 1;
			}
			
		}
		
	
	}
		
}



